package com.dowsure.apisaas.model;

import com.dowsure.apisaas.annotation.RequestParamValidated;
import com.dowsure.apisaas.enums.CreditStatusEnums;
import com.dowsure.apisaas.enums.CurrencyEnums;
import com.dowsure.apisaas.enums.TermUnitEnums;
import com.dowsure.apisaas.enums.YesNoEnums;
import com.dowsure.apisaas.util.DowsureDateUtils;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @description: 传输授信结果请求参数
 * @author: Dowsure
 * @create: 2022-02-15 14:19
 **/
@Data
public class CreditResultRequestParams {

    /**
     * Dowsure 卖家申请单编号
     */
    @RequestParamValidated(required = true, msg = "Dowsure 卖家申请单编号", maxLen = 32)
    private String applicationCode;

    /**
     * 授信状态
     * REJECT（拒绝）、APPROVE（批准）
     */
    @RequestParamValidated(required = true, msg = "授信状态", maxLen = 32)
    private CreditStatusEnums creditStatus;

    /**
     * 授信开始时间
     * YYYY-MM-DD hh:mm:ss
     */
    @RequestParamValidated(msg = "授信开始时间", format = DowsureDateUtils.YYYYMMDDHHMMSS)
    private String startTime;

    /**
     * 授信结束时间
     * YYYY-MM-DD hh:mm:ss
     */
    @RequestParamValidated(msg = "授信结束时间", format = DowsureDateUtils.YYYYMMDDHHMMSS)
    private String endTime;

    /**
     * 授信期限长度
     */
    @RequestParamValidated(msg = "授信期限长度")
    private Integer term;

    /**
     * 授信期限单位：DAY、MONTH、YEAR
     */
    @RequestParamValidated(msg = "授信期限单位")
    private TermUnitEnums termUnit;

    /**
     * 授信年利率 Decimal(5,2)
     */
    @RequestParamValidated(msg = "授信年利率")
    private BigDecimal apr;

    /**
     * 授信编码
     */
    @RequestParamValidated(msg = "授信编码", maxLen = 32)
    private String creditCode;

    /**
     * 授信合同编号
     */
    @RequestParamValidated(msg = "授信合同编号", maxLen = 32)
    private String creditContractNo;

    /**
     * 授信金额
     */
    @RequestParamValidated(msg = "授信金额")
    private BigDecimal amount;

    /**
     * 币种
     */
    @RequestParamValidated(msg = "币种")
    private CurrencyEnums currency;

    /**
     *手续费 Decimal(12,2)
     */
    @RequestParamValidated(msg = "手续费")
    private BigDecimal processingFee;

    /**
     * 拒绝原因
     */
    @RequestParamValidated(msg = "拒绝原因", maxLen = 200)
    private String reason;

    /**
     * 是否需要Amazon锁定账户
     * 默认:YES
     * YES：需要锁定，NO：不需要锁定
     */
    @RequestParamValidated(msg = "是否需要Amazon锁定账户")
    private YesNoEnums isLock;
}
